package com.coolw.design.pattern.structure.decorate;

/**
 * 具体装饰类, 牛奶
 *
 * @author coolw
 * @date 2019-12-24 10:59
 */
public class WithMilk extends AbstractCoffeeDecorator {

    public WithMilk(Coffee house) {
        super(house);
    }

    /**
     * 价格
     */
    @Override
    public double price() {
        double addPrice = 1;
        return super.price() + addPrice;
    }

    /**
     * 配料
     */
    @Override
    public String ingredients() {
        String addIngredients = "milk";
        return super.ingredients() + "," + addIngredients;
    }
}
